package com.kai.expertdata;

import java.io.File;
import java.io.IOException;

import android.app.Activity;
import android.app.ProgressDialog;
import android.content.ContentValues;
import android.database.Cursor;
import android.database.sqlite.SQLiteDatabase;
import android.os.Bundle;
import android.os.Handler;
import android.os.Message;
import android.util.Log;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;
import android.widget.TextView;

public class ExportData extends Activity implements OnClickListener, Constants{
	
	private static final String TAG = "export";
	private Button btnExport;
	private TextView tvWarn;
	private File path; //数据库文件目录
	private File file; //数据库文件
	private SQLiteDatabase db;
	private ProgressDialog mpDialog;
	private Handler handler = new Handler(){

		@Override
		public void handleMessage(Message msg) {
			// TODO Auto-generated method stub
			Log.i("export", "export data success");
			mpDialog.cancel();
		}
		
	};
	
    /** Called when the activity is first created. */
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.main);
        
        btnExport = (Button)this.findViewById(R.id.button1);
        btnExport.setOnClickListener(this);
        tvWarn = (TextView)this.findViewById(R.id.warn);
        tvWarn.setVisibility(View.INVISIBLE);
        
        //在sdcard中创建数据库
        path = new File("/sdcard/dbfile"); 
        file = new File("/sdcard/dbfile/ph.db");
        if(!path.exists()){
        	path.mkdirs();
        	Log.i(TAG, "ok-0");
        }
        if(!file.exists()){
        	try{
        		file.createNewFile();
        	}
        	catch(IOException e){
        		e.printStackTrace();
        	}
        }
    }


	@Override
	public void onClick(View v) {
		// TODO Auto-generated method stub
		if(v==btnExport){
			mpDialog = new ProgressDialog(ExportData.this);
			mpDialog.setMessage("正在导出，请稍候......"); 
			mpDialog.setProgressStyle(ProgressDialog.STYLE_SPINNER);//设置风格为圆形进度条  
			mpDialog.setIndeterminate(false);//设置进度条是否为不明确  
			mpDialog.setCancelable(false);//设置进度条是否可以按退回键取消  
			mpDialog.show();
			new Thread(){

				@Override
				public void run() {
					// TODO Auto-generated method stub
					Message message = handler.obtainMessage();
					try{
						db = SQLiteDatabase.openOrCreateDatabase(file, null);
						//1.档案封面表
						db.execSQL("CREATE TABLE " + TB_HERE_TIPA_INFO + " (" + _ID+ " INTEGER PRIMARY KEY AUTOINCREMENT, "+ 
								HETI_PROFILEID + " INTEGER, " +
								HETI_HERE_ID + " TEXT," +
								HETI_NAME + " TEXT, " +
								HETI_NOW_ADDR + " TEXT, " +
								HETI_HORE_ADDR + " TEXT, " +
								HETI_TEL + " TEXT, " +
								HETI_TOWN_NAME + " TEXT, " +
								HETI_VICO_NAME + " TEXT, " +
								HETI_BUIL_UNIT + " TEXT, " +
								HETI_BUIL_PER + " TEXT, " +
								HETI_DOCTOR + " TEXT, " +
								HETI_BUIL_DATE + " TEXT "+");");
						
						//创建姓名id视图
						db.execSQL("CREATE VIEW " + VIEW_HERE_TIPA_INFO + 
								" AS SELECT "+ HETI_PROFILEID+","+HETI_HERE_ID+","+HETI_NAME+
								" FROM "+TB_HERE_TIPA_INFO+";");
						
						//2.模块选择表
						db.execSQL("CREATE TABLE " + TB_MODULE_SELECT+ " ( "
								+ MOSE_PROFILE_ID + " INTEGER PRIMARY KEY AUTOINCREMENT, "
								+ MOSE_HEALTH_RECORD_ID + " INTEGER,"
								+ MOSE_VACCINATE_ID + " INTEGER," 
								+ MOSE_0_6_CHILD_HEALTH_ID + " INTEGER,"
								+ MOSE_MATERNAL_HEALTH_ID + " INTEGER,"
								+ MOSE_OLDS_ID + " INTEGER,"
								+ MOSE_HYPERTENSION_ID + " INTEGER,"
								+ MOSE_DIABET2_ID + " INTEGER,"
								+ MOSE_MENTAL_ID + " INTEGER " + " ); ");
						
						//3.个人基本信息表
						db.execSQL("CREATE TABLE " + TB_PERSON_INFO + " ( "
								+ PEIN_ID + " INTEGER PRIMARY KEY AUTOINCREMENT, "
								+ PEIN_PROFILE_ID + " INTEGER, "
								+ PEIN_SEX + " INTEGER, "
								+ PEIN_BORN + " TEXT, "
								+ PEIN_PERID + " TEXT, "
								+ PEIN_WORK + " TEXT,"
								+ PEIN_PHONE + " TEXT, "
								+ PEIN_CONTACT_NAME + " TEXT, "
								+ PEIN_CONTACT_PHONE + " TEXT, "
								+ PEIN_PERMATENT_TYPE + " INTEGER, "
								+ PEIN_NATION + " INTEGER, "
								+ PEIN_MINORITY+ " TEXT, "
								+ PEIN_BLOOD_TYPE + " INTEGER, "
								+ PEIN_RH_NEGATIVE + " INTEGER, "
								+ PEIN_CULTURE_STDD + " INTEGER, "
								+ PEIN_OCCUPATION + " INTEGER, "
								+ PEIN_MARRIAGE + " INTEGER, "
								+ PEIN_HOS_COST_TYPE + " TEXT, "
								+ PEIN_HOS_COST_TYPE_OT + " TEXT, "
								+ PEIN_DRUG_ALLERGY + " TEXT, "
								+ PEIN_DRUG_ALLERGY_OT + " TEXT, "
								+ PEIN_EXPOSURE_HIS + " TEXT, "
								+ PEIN_DISEASE + " TEXT, "
								+ PEIN_CANCER + " TEXT, "
								+ PEIN_OCC_DIS + " TEXT, "
								+ PEIN_DISEASE_OT + " TEXT, "
								+ PEIN_DISEASE_DATE + " TEXT, "
								+ PEIN_SURGERY + " INTEGER, "
								+ PEIN_SURGERY_NAME1 + " TEXT, "
								+ PEIN_SURGERY_DATE1 + " TEXT, "
								+ PEIN_SURGERY_NAME2 + " TEXT, "
								+ PEIN_SURGERY_DATE2 + " TEXT, "
								+ PEIN_TRAUMA + " INTEGER, "
								+ PEIN_TRAUMA_NAME1 + " TEXT, "
								+ PEIN_TRAUMA_TIME1 + " TEXT, "
								+ PEIN_TRAUMA_NAME2 + " TEXT, "
								+ PEIN_TRAUMA_TIME2 + " TEXT, "
								+ PEIN_TRANSFUSION + " INTEGER, "
								+ PEIN_TRFUSION_REASON1 + " TEXT, "
								+ PEIN_TRFUSION_TIME1 + " TEXT, "
								+ PEIN_TRFUSION_REASON2 + " TEXT, "
								+ PEIN_TRFUSION_TIME2 + " TEXT, "
								+ PEIN_FAMILY_HIS_FT + " TEXT, "
								+ PEIN_FAMILY_HIS_FT_OT + " TEXT, "
								+ PEIN_FAMILY_HIS_MT + " TEXT, "
								+ PEIN_FAMILY_HIS_MT_OT + " TEXT, "
								+ PEIN_FAMILY_HIS_BS + " TEXT, "
								+ PEIN_FAMILY_HIS_BS_OT + " TEXT, "
								+ PEIN_FAMILY_HIS_SD + " TEXT, "
								+ PEIN_FAMILY_HIS_SD_OT + " TEXT, "
								+ PEIN_HEREDITARY_HIS + " INTEGER, "
								+ PEIN_HEREDITARY_NAME + " TEXT, "
								+ PEIN_DISABLE_SITU + " TEXT, "
								+ PEIN_DISABLE_SITU_OT + " TEXT, "
								+ PEIN_LIVE_KIT + " INTEGER, "
								+ PEIN_LIVE_FUEL + " INTEGER, "
								+ PEIN_LIVE_WATER + " INTEGER, "
								+ PEIN_LIVE_TOILET + " INTEGER, "
								+ PEIN_LIVE_STOCK + " INTEGER " + " ); ");
						
						
						//4.个人基本信息修改日志表
						db.execSQL("CREATE TABLE " + TB_PERSON_INFO_LOG + " ( "
								+ PILO_LOG_ID + " INTEGER PRIMARY KEY AUTOINCREMENT, "
								+ PILO_PROFILE_ID + " INTEGER, "
						//		+ PILO_PERSON_INFO_ID + " INTEGER, "
								+ PILO_TIMESTAMP + " TEXT, "
								+ PILO_COLUMN_VALUE + " TEXT, "
								+ PILO_PREVIOUS_VALUE + " TEXT, "
								+ PILO_CURRENT_VALUE + " TEXT " + " ); ");
						
						//5.健康体检表
						db.execSQL("CREATE TABLE " + TB_HEALTH_TEST + " (" + _ID+ " INTEGER PRIMARY KEY AUTOINCREMENT, "+ 
								HETE_COLUMN1 + " INTEGER, " +
								HETE_COLUMN178 + " INTEGER, " +
								HETE_COLUMN2 + " TEXT, " +
								HETE_COLUMN3 + " TEXT, " +
								HETE_COLUMN4 + " TEXT, " +
								HETE_COLUMN5 + " TEXT, " +
								HETE_COLUMN6 + " REAL, " +
								HETE_COLUMN7 + " INTEGER, " +
								HETE_COLUMN8 + " INTEGER, " +
								HETE_COLUMN9 + " INTEGER, " +
								HETE_COLUMN10 + " INTEGER, " +
								HETE_COLUMN11 + " INTEGER, " +
								HETE_COLUMN12 + " INTEGER, " +
								HETE_COLUMN13 + " INTEGER, " +
								HETE_COLUMN14 + " REAL, " +
								HETE_COLUMN15 + " INTEGER, " +
								HETE_COLUMN16 + " REAL, " +
								HETE_COLUMN17 + " INTEGER, " +
								HETE_COLUMN18 + " INTEGER, " +
								HETE_COLUMN19 + " INTEGER, " +
								HETE_COLUMN20 + " INTEGER, " +
								HETE_COLUMN21 + " INTEGER, " +
								HETE_COLUMN22 + " INTEGER, " +
								HETE_COLUMN23 + " INTEGER, " +
								HETE_COLUMN24 + " INTEGER, " +
								HETE_COLUMN25 + " INTEGER, " +
								HETE_COLUMN26 + " TEXT, " +
								HETE_COLUMN27 + " TEXT, " +
								HETE_COLUMN28 + " INTEGER, " +
								HETE_COLUMN29 + " INTEGER, " +
								HETE_COLUMN30 + " INTEGER, " +
								HETE_COLUMN31 + " INTEGER, " +
								HETE_COLUMN32 + " INTEGER, " +
								HETE_COLUMN33 + " REAL, " +
								HETE_COLUMN34 + " INTEGER, " +
								HETE_COLUMN35 + " INTEGER, " +
								HETE_COLUMN36 + " INTEGER, " +
								HETE_COLUMN37 + " INTEGER, " +
								HETE_COLUMN38 + " TEXT, " +
								HETE_COLUMN39 + " TEXT, " +
								HETE_COLUMN40 + " INTEGER, " +
								HETE_COLUMN41 + " TEXT, " +
								HETE_COLUMN42 + " INTEGER, " +
								HETE_COLUMN43 + " TEXT, " +
								HETE_COLUMN44 + " INTEGER, " +
								HETE_COLUMN45 + " TEXT, " +
								HETE_COLUMN46 + " TEXT, " +
								HETE_COLUMN47 + " INTEGER, " +
								HETE_COLUMN48 + " TEXT, " +
								HETE_COLUMN49 + " TEXT, " +
								HETE_COLUMN50 + " INTEGER, " +
								HETE_COLUMN51 + " TEXT, " +
								HETE_COLUMN52 + " TEXT, " +
								HETE_COLUMN53 + " INTEGER, " +
								HETE_COLUMN54 + " TEXT, " +
								HETE_COLUMN55 + " TEXT, " +
								HETE_COLUMN56 + " INTEGER, " +
								HETE_COLUMN57 + " TEXT, " +
								HETE_COLUMN58 + " INTEGER, " +
								HETE_COLUMN59 + " INTEGER, " +
								HETE_COLUMN60 + " INTEGER, " +
								HETE_COLUMN61 + " REAL, " +
								HETE_COLUMN62 + " REAL, " +
								HETE_COLUMN63 + " REAL, " +
								HETE_COLUMN64 + " REAL, " +
								HETE_COLUMN65 + " INTEGER, " +
								HETE_COLUMN66 + " INTEGER, " +
								HETE_COLUMN67 + " INTEGER, " +
								HETE_COLUMN68 + " TEXT, " +
								HETE_COLUMN69 + " INTEGER, " +
								HETE_COLUMN70 + " TEXT, " +
								HETE_COLUMN71 + " INTEGER, " +
								HETE_COLUMN72 + " TEXT, " +
								HETE_COLUMN73 + " INTEGER, " +
								HETE_COLUMN74 + " TEXT, " +
								HETE_COLUMN75 + " INTEGER, " +
								HETE_COLUMN76 + " INTEGER, " +
								HETE_COLUMN77 + " TEXT, " +
								HETE_COLUMN78 + " INTEGER, " +
								HETE_COLUMN79 + " TEXT, " +
								HETE_COLUMN80 + " INTEGER, " +
								HETE_COLUMN81 + " INTEGER, " +
								HETE_COLUMN82 + " INTEGER, " +
								HETE_COLUMN83 + " TEXT, " +
								HETE_COLUMN84 + " INTEGER, " +
								HETE_COLUMN85 + " TEXT, " +
								HETE_COLUMN86 + " INTEGER, " +
								HETE_COLUMN87 + " TEXT, " +
								HETE_COLUMN88 + " INTEGER, " +
								HETE_COLUMN89 + " TEXT, " +
								HETE_COLUMN90 + " INTEGER, " +
								HETE_COLUMN91 + " TEXT, " +
								HETE_COLUMN92 + " INTEGER, " +
								HETE_COLUMN93 + " TEXT, " +
								HETE_COLUMN94 + " INTEGER, " +
								HETE_COLUMN95 + " INTEGER, " +
								HETE_COLUMN96 + " INTEGER, " +
								HETE_COLUMN97 + " TEXT, " +
								HETE_COLUMN98 + " TEXT, " +
								HETE_COLUMN99 + " TEXT, " +
								HETE_COLUMN100 + " INTEGER, " +
								HETE_COLUMN101 + " TEXT, " +
								HETE_COLUMN102 + " INTEGER, " +
								HETE_COLUMN103 + " TEXT, " +
								HETE_COLUMN104 + " INTEGER, " +
								HETE_COLUMN105 + " TEXT, " +
								HETE_COLUMN106 + " INTEGER, " +
								HETE_COLUMN107 + " TEXT, " +
								HETE_COLUMN108 + " INTEGER, " +
								HETE_COLUMN109 + " TEXT, " +
								HETE_COLUMN110 + " TEXT, " +
								HETE_COLUMN111 + " REAL, " +
								HETE_COLUMN112 + " REAL, " +
								HETE_COLUMN113 + " REAL, " +
								HETE_COLUMN114 + " REAL, " +
								HETE_COLUMN115 + " REAL, " +
								HETE_COLUMN116 + " REAL, " +
								HETE_COLUMN117 + " REAL, " +
								HETE_COLUMN118 + " REAL, " +
								HETE_COLUMN119 + " REAL, " +
								HETE_COLUMN120 + " REAL, " +
								HETE_COLUMN121 + " REAL, " +
								HETE_COLUMN122 + " INTEGER, " +
								HETE_COLUMN123 + " TEXT, " +
								HETE_COLUMN124 + " REAL, " +
								HETE_COLUMN125 + " INTEGER, " +
								HETE_COLUMN126 + " REAL, " +
								HETE_COLUMN127 + " INTEGER, " +
								HETE_COLUMN128 + " REAL, " +
								HETE_COLUMN129 + " REAL, " +
								HETE_COLUMN130 + " REAL, " +
								HETE_COLUMN131 + " REAL, " +
								HETE_COLUMN132 + " REAL, " +
								HETE_COLUMN133 + " REAL, " +
								HETE_COLUMN134 + " REAL, " +
								HETE_COLUMN135 + " REAL, " +
								HETE_COLUMN136 + " REAL, " +
								HETE_COLUMN137 + " REAL, " +
								HETE_COLUMN138 + " REAL, " +
								HETE_COLUMN139 + " REAL, " +
								HETE_COLUMN140 + " REAL, " +
								HETE_COLUMN141 + " INTEGER, " +
								HETE_COLUMN142 + " TEXT, " +
								HETE_COLUMN143 + " INTEGER, " +
								HETE_COLUMN144 + " TEXT, " +
								HETE_COLUMN145 + " INTEGER, " +
								HETE_COLUMN146 + " TEXT, " +
								HETE_COLUMN147 + " TEXT, " +
								HETE_COLUMN148 + " INTEGER, " +
								HETE_COLUMN149 + " INTEGER, " +
								HETE_COLUMN150 + " INTEGER, " +
								HETE_COLUMN151 + " INTEGER, " +
								HETE_COLUMN152 + " INTEGER, " +
								HETE_COLUMN153 + " INTEGER, " +
								HETE_COLUMN154 + " INTEGER, " +
								HETE_COLUMN155 + " INTEGER, " +
								HETE_COLUMN156 + " INTEGER, " +
								HETE_COLUMN157 + " TEXT, " +
								HETE_COLUMN158 + " TEXT, " +
								HETE_COLUMN159 + " TEXT, " +
								HETE_COLUMN160 + " TEXT, " +
								HETE_COLUMN161 + " TEXT, " +
								HETE_COLUMN162 + " TEXT, " +
								HETE_COLUMN163 + " TEXT, " +
								HETE_COLUMN164 + " TEXT, " +
								HETE_COLUMN165 + " TEXT, " +
								HETE_COLUMN166 + " TEXT, " +
								HETE_COLUMN167 + " INTEGER, " +
								HETE_COLUMN168 + " TEXT, " +
								HETE_COLUMN169 + " INTEGER, " +
								HETE_COLUMN170 + " TEXT, " +
								HETE_COLUMN171 + " INTEGER, " +
								HETE_COLUMN172 + " TEXT, " +
								HETE_COLUMN173 + " TEXT, " +
								HETE_COLUMN174 + " TEXT, " +
								HETE_COLUMN175 + " TEXT, " +
								HETE_COLUMN176 + " TEXT, " +
								HETE_COLUMN177 + " TEXT "+");");
						
						//6.健康体检表之住院史表
						db.execSQL("CREATE TABLE " + TB_HOSPITAL_HISTORY + " (" + _ID+ " INTEGER PRIMARY KEY AUTOINCREMENT, "+ 
								HOHI_COLUMN1 + " INTEGER, " +
								HOHI_COLUMN7 + " INTEGER, " +
								HOHI_COLUMN8 + " INTEGER, " +
								HOHI_COLUMN2 + " TEXT, " +
								HOHI_COLUMN3 + " TEXT, " +
								HOHI_COLUMN4 + " TEXT, " +
								HOHI_COLUMN5 + " TEXT, " +
								HOHI_COLUMN6 + " TEXT "+");");
						
						//7.健康体检表之病床史表
						db.execSQL("CREATE TABLE " + TB_SICKBED_HISTORY + " (" + _ID+ " INTEGER PRIMARY KEY AUTOINCREMENT, "+ 
								SIHI_COLUMN1 + " INTEGER, " +
								SIHI_COLUMN7 + " INTEGER, " +
								SIHI_COLUMN8 + " INTEGER, " +
								SIHI_COLUMN2 + " TEXT, " +
								SIHI_COLUMN3 + " TEXT, " +
								SIHI_COLUMN4 + " TEXT, " +
								SIHI_COLUMN5 + " TEXT, " +
								SIHI_COLUMN6 + " TEXT "+");");
						
						//8.健康体检表之用药记录表
						db.execSQL("CREATE TABLE " + TB_MEDICATE_RECORD + " (" + _ID+ " INTEGER PRIMARY KEY AUTOINCREMENT, "+ 
								MERE_COLUMN1 + " INTEGER, " +
								MERE_COLUMN7 + " INTEGER, " +
								MERE_COLUMN8 + " INTEGER, " +
								MERE_COLUMN2 + " TEXT, " +
								MERE_COLUMN3 + " TEXT, " +
								MERE_COLUMN4 + " TEXT, " +
								MERE_COLUMN5 + " TEXT, " +
								MERE_COLUMN6 + " INTEGER "+");");
						
						//9.健康体检表之非免疫预防接种表
						db.execSQL("CREATE TABLE " + TB_NONIMMUNE_VACCINE_HISTORY + " (" + _ID+ " INTEGER PRIMARY KEY AUTOINCREMENT, "+ 
								NOVH_COLUMN1 + " INTEGER, " +
								NOVH_COLUMN5 + " INTEGER, " +
								NOVH_COLUMN6 + " INTEGER, " +
								NOVH_COLUMN2 + " TEXT, " +
								NOVH_COLUMN3 + " TEXT, " +
								NOVH_COLUMN4 + " TEXT "+");");
						
						//10.接诊记录表
						db.execSQL("CREATE TABLE " + TB_THER_RACE_INFO + " (" + _ID+ " INTEGER PRIMARY KEY AUTOINCREMENT, "+ 
								THRE_PROFILEID + " INTEGER, " +
								THRE_STATE + " INTEGER, " +
								THRE_SUBJ_INFO + " TEXT," +
								THRE_OBJE_INFO + " TEXT, " +
								THRE_EVAL + " TEXT, " +
								THRE_PLAN + " TEXT, " +
								THRE_DOCTOR + " TEXT, " +
								THRE_DATE + " TEXT "+");");
						
						//11.会诊记录表
						db.execSQL("CREATE TABLE " + TB_CONS_RECE_INFO + " (" + _ID+ " INTEGER PRIMARY KEY AUTOINCREMENT, "+ 
								CORE_PROFILEID + " INTEGER, " +
								CORE_STATE + " INTEGER, " +
								CORE_REASON + " TEXT," +
								CORE_OPINION + " TEXT, " +
								CORE_INST_1 + " TEXT, " +
								CORE_INST_2 + " TEXT, " +
								CORE_INST_3 + " TEXT, " +
								CORE_INST_4 + " TEXT, " +
								CORE_INST_5 + " TEXT, " +
								CORE_DOCT_1 + " TEXT, " +
								CORE_DOCT_2 + " TEXT, " +
								CORE_DOCT_3 + " TEXT, " +
								CORE_DOCT_4 + " TEXT, " +
								CORE_DOCT_5 + " TEXT, " +
								CORE_DOCTOR + " TEXT, " +
								CORE_DATE + " TEXT "+");");
						
						//12.新生儿访视表
						db.execSQL("CREATE TABLE " + TB_BORN_CHILD_INFO + " (" + _ID+ " INTEGER PRIMARY KEY AUTOINCREMENT, "+ 
								BOCH_PROFILEID + " INTEGER, " +
								BOCH_SEX + " INTEGER," +
								BOCH_BIRTHDAY + " TEXT, " +
								BOCH_PERID + " TEXT, " +
								BOCH_FAM_ADDR + " TEXT, " +
								BOCH_FATH_NAME + " TEXT, " +
								BOCH_FATH_PRO + " TEXT, " +
								BOCH_FATH_TEL + " TEXT," +
								BOCH_FATH_BIRTH + " TEXT, " +
								BOCH_MUM_NAME + " TEXT, " +
								BOCH_MUM_PRO + " TEXT, " +
								BOCH_MUM_TEL + " TEXT, " +
								BOCH_MUM_BIRTH + " TEXT, " +
								BOCH_GW + " INTEGER," +
								BOCH_MUM_DISEASE + " INTEGER, " +
								BOCH_MUM_DISEASE_OTHER + " TEXT, " +
								BOCH_PART_INST + " TEXT, " +
								BOCH_BORN_INST + " TEXT, " +
								BOCH_BORN_INST_OTHER + " TEXT, " +
								BOCH_SMOTHER + " INTEGER," +
								BOCH_ABNORMAL + " INTEGER, " +
								BOCH_ABNORMAL_INFO + " TEXT, " +
								BOCH_HEARING + " INTEGER, " +
								BOCH_DISEASE + " INTEGER, " +
								BOCH_DISEASE_OTHER + " TEXT, " +
								BOCH_BORN_WEIGHT + " REAL," +
								BOCH_NOW_WEIGHT + " REAL, " +
								BOCH_HEIG_VALUE + " REAL, " +
								BOCH_FEED_WAY + " INTEGER, " +
								BOCH_FEED_MILK + " REAL, " +
								BOCH_FEED_MILK_NUM + " INTEGER, " +
								BOCH_VOMIT + " INTEGER," +
								BOCH_FAECES + " INTEGER, " +
								BOCH_FAECES_NUM + " INTEGER, " +
								BOCH_BODY_TEMP + " REAL, " +
								BOCH_PULSE + " INTEGER, " +
								BOCH_BREATH + " INTEGER, " +
								BOCH_FACE + " INTEGER," +
								BOCH_FACE_OTHER + " TEXT, " +
								BOCH_ICTERUS + " INTEGER, " +
								BOCH_BREGMA_CHOI + " INTEGER, " +
								BOCH_BREGMA_LEFT + " REAL, " +
								BOCH_BREGMA_RIGHT + " REAL, " +
								BOCH_BREGMA_OTHER + " TEXT," +
								BOCH_EYE_APPEARANCE + " INTEGER, " +
								BOCH_EYE_APPEARANCE_ABN + " TEXT, " +
								BOCH_LEGS + " INTEGER, " +
								BOCH_LEGS_ABN + " TEXT, " +
								BOCH_NECK_MASS + " INTEGER, " +
								BOCH_NECK_MASS_ABN+ " TEXT," +
								BOCH_EAR_APPEARANCE + " INTEGER, " +
								BOCH_EAR_APPEARANCE_ABN + " TEXT, " +
								BOCH_NOSE + " INTEGER, " +
								BOCH_NOSE_ABN + " TEXT, " +
								BOCH_SKIN + " INTEGER, " +
								BOCH_SKIN_OTHER + " TEXT, " +
								BOCH_ORAL + " INTEGER, " +
								BOCH_ORAL_ABN + " TEXT, " +
								BOCH_ANUS+ " INTEGER, " +
								BOCH_ANUS_ABN + " TEXT," +
								BOCH_CARD + " INTEGER, " +
								BOCH_CARD_ABN + " TEXT, " +
								BOCH_GENITAL+ " INTEGER, " +
								BOCH_GENITAL_ABN + " TEXT, " +
								BOCH_ABDOMEN + " INTEGER, " +
								BOCH_ABDOMEN_ABN + " TEXT, " +
								BOCH_SPINE + " INTEGER, " +
								BOCH_SPINE_ABN + " TEXT, " +
								BOCH_UMBILICAL + " INTEGER, " +
								BOCH_UMBILICAL_OTHER + " TEXT," +
								BOCH_REFE_CHOI + " INTEGER, " +
								BOCH_REFE_REASION + " TEXT, " +
								BOCH_REFE_INST + " TEXT, " +
								BOCH_GUIDE + " TEXT, " +
								BOCH_NOW_DATE + " TEXT, " +
								BOCH_NEXT_PLACE + " TEXT, " +
								BOCH_NEXT_DATE + " TEXT, " +
								BOCH_DOCTOR + " TEXT "+");");
						
						//创建儿童姓名编号视图
						db.execSQL("CREATE VIEW " + VIEW_CHILD_NAME_CODE + 
								" AS SELECT "+ HETI_PROFILEID+","+HETI_NAME+
								" FROM "+TB_HERE_TIPA_INFO+","+TB_BORN_CHILD_INFO+
								" WHERE "+HETI_PROFILEID+"="+BOCH_PROFILEID+";"
						);
						
						
						
						//16.第1次产前随访记录表
						db.execSQL("CREATE TABLE " + TB_FIRST_PRENATAL_VISIT+ " (" + _ID+ " INTEGER PRIMARY KEY AUTOINCREMENT, "+ 
								FIPV_COLUMN1 + " INTEGER, " +
								FIPV_COLUMN2 + " TEXT, " +
								FIPV_COLUMN3 + " INTEGER, " +
								FIPV_COLUMN4 + " INTEGER, " +
								FIPV_COLUMN5 + " TEXT, " +
								FIPV_COLUMN6 + " INTEGER, " +
								FIPV_COLUMN7 + " TEXT, " +
								FIPV_COLUMN8 + " INTEGER, " +
								FIPV_COLUMN9 + " INTEGER, " +
								FIPV_COLUMN10 + " INTEGER, " +
								FIPV_COLUMN11 + " INTEGER, " +
								FIPV_COLUMN12 + " TEXT, " +
								FIPV_COLUMN13 + " TEXT, " +
								FIPV_COLUMN14 + " TEXT, " +
								FIPV_COLUMN15 + " TEXT, " +
								FIPV_COLUMN16 + " TEXT, " +
								FIPV_COLUMN17 + " TEXT, " +
								FIPV_COLUMN18 + " TEXT, " +
								FIPV_COLUMN19 + " TEXT, " +
								FIPV_COLUMN20 + " INTEGER, " +
								FIPV_COLUMN21 + " TEXT, " +
								FIPV_COLUMN85 + " TEXT, " +
								FIPV_COLUMN22 + " INTEGER, " +
								FIPV_COLUMN23 + " INTEGER, " +
								FIPV_COLUMN24 + " INTEGER, " +
								FIPV_COLUMN25 + " INTEGER, " +
								FIPV_COLUMN26 + " INTEGER, " +
								FIPV_COLUMN27 + " INTEGER, " +
								FIPV_COLUMN28 + " REAL, " +
								FIPV_COLUMN29 + " REAL, " +
								FIPV_COLUMN30 + " INTEGER, " +
								FIPV_COLUMN31 + " INTEGER, " +
								FIPV_COLUMN32 + " INTEGER, " +
								FIPV_COLUMN33 + " TEXT, " +
								FIPV_COLUMN34 + " INTEGER, " +
								FIPV_COLUMN35 + " TEXT, " +
								FIPV_COLUMN36 + " INTEGER, " +
								FIPV_COLUMN37 + " TEXT, " +
								FIPV_COLUMN38 + " INTEGER, " +
								FIPV_COLUMN39 + " TEXT, " +
								FIPV_COLUMN40 + " INTEGER, " +
								FIPV_COLUMN41 + " TEXT, " +
								FIPV_COLUMN42 + " INTEGER, " +
								FIPV_COLUMN43 + " TEXT, " +
								FIPV_COLUMN44 + " INTEGER, " +
								FIPV_COLUMN45 + " TEXT, " +
								FIPV_COLUMN46 + " REAL, " +
								FIPV_COLUMN47 + " REAL, " +
								FIPV_COLUMN48 + " REAL, " +
								FIPV_COLUMN49 + " REAL, " +
								FIPV_COLUMN50 + " REAL, " +
								FIPV_COLUMN51 + " REAL, " +
								FIPV_COLUMN52 + " REAL, " +
								FIPV_COLUMN53 + " REAL, " +
								FIPV_COLUMN54 + " REAL, " +
								FIPV_COLUMN55 + " TEXT, " +
								FIPV_COLUMN56 + " TEXT, " +
								FIPV_COLUMN57 + " REAL, " +
								FIPV_COLUMN58 + " REAL, " +
								FIPV_COLUMN59 + " REAL, " +
								FIPV_COLUMN60 + " REAL, " +
								FIPV_COLUMN61 + " REAL, " +
								FIPV_COLUMN62 + " REAL, " +
								FIPV_COLUMN63 + " REAL, " +
								FIPV_COLUMN64 + " REAL, " +
								FIPV_COLUMN65 + " TEXT, " +
								FIPV_COLUMN66 + " TEXT, " +
								FIPV_COLUMN67 + " INTEGER, " +
								FIPV_COLUMN68 + " TEXT, " +
								FIPV_COLUMN69 + " TEXT, " +
								FIPV_COLUMN70 + " TEXT, " +
								FIPV_COLUMN71 + " TEXT, " +
								FIPV_COLUMN72 + " TEXT, " +
								FIPV_COLUMN73 + " INTEGER, " +
								FIPV_COLUMN74 + " INTEGER, " +
								FIPV_COLUMN75 + " TEXT, " +
								FIPV_COLUMN76 + " INTEGER, " +
								FIPV_COLUMN77 + " TEXT, " +
								FIPV_COLUMN78 + " TEXT, " +
								FIPV_COLUMN79 + " TEXT, " +
								FIPV_COLUMN80 + " INTEGER, " +
								FIPV_COLUMN81 + " TEXT, " +
								FIPV_COLUMN82 + " TEXT, " +
								FIPV_COLUMN83 + " TEXT, " +
								FIPV_COLUMN84 + " TEXT "+");");
						
						//创建孕妇姓名编号视图
						db.execSQL("CREATE VIEW " + VIEW_WOMEN_NAME_CODE + 
								" AS SELECT "+ HETI_PROFILEID+","+HETI_NAME+
								" FROM "+TB_HERE_TIPA_INFO+","+TB_FIRST_PRENATAL_VISIT+
								" WHERE "+HETI_PROFILEID+"="+FIPV_COLUMN1+";"
						);
						
						//17.第2~5次产前随访记录表
						db.execSQL("CREATE TABLE " + TB_PRENATAL_VISIT + " (" + _ID+ " INTEGER PRIMARY KEY AUTOINCREMENT, "+ 
								PRVI_COLUMN1 + " INTEGER, " +
								PRVI_COLUMN2 + " TEXT, " +
								PRVI_COLUMN3 + " INTEGER, " +
								PRVI_COLUMN4 + " INTEGER, " +
								PRVI_COLUMN5 + " TEXT, " +
								PRVI_COLUMN6 + " REAL, " +
								PRVI_COLUMN7 + " INTEGER, " +
								PRVI_COLUMN8 + " INTEGER, " +
								PRVI_COLUMN9 + " TEXT, " +
								PRVI_COLUMN10 + " INTEGER, " +
								PRVI_COLUMN11 + " INTEGER, " +
								PRVI_COLUMN12 + " INTEGER, " +
								PRVI_COLUMN13 + " REAL, " +
								PRVI_COLUMN14 + " REAL, " +
								PRVI_COLUMN15 + " TEXT, " +
								PRVI_COLUMN16 + " INTEGER, " +
								PRVI_COLUMN17 + " TEXT, " +
								PRVI_COLUMN18 + " TEXT, " +
								PRVI_COLUMN19 + " TEXT, " +
								PRVI_COLUMN20 + " INTEGER, " +
								PRVI_COLUMN21 + " TEXT, " +
								PRVI_COLUMN22 + " TEXT, " +
								PRVI_COLUMN23 + " TEXT, " +
								PRVI_COLUMN24 + " TEXT "+");");
						
						//18.产后访视表
						db.execSQL("CREATE TABLE " + TB_POSTNATAL_VISIT + " (" + _ID+ " INTEGER PRIMARY KEY AUTOINCREMENT, "+ 
								POVI_COLUMN1 + " INTEGER, " +
								POVI_COLUMN2 + " TEXT, " +
								POVI_COLUMN3 + " REAL, " +
								POVI_COLUMN4 + " TEXT, " +
								POVI_COLUMN5 + " TEXT, " +
								POVI_COLUMN6 + " INTEGER, " +
								POVI_COLUMN7 + " INTEGER, " +
								POVI_COLUMN8 + " INTEGER, " +
								POVI_COLUMN9 + " TEXT, " +
								POVI_COLUMN10 + " INTEGER, " +
								POVI_COLUMN11 + " TEXT, " +
								POVI_COLUMN12 + " INTEGER, " +
								POVI_COLUMN13 + " TEXT, " +
								POVI_COLUMN14 + " INTEGER, " +
								POVI_COLUMN15 + " TEXT, " +
								POVI_COLUMN16 + " TEXT, " +
								POVI_COLUMN17 + " INTEGER, " +
								POVI_COLUMN18 + " TEXT, " +
								POVI_COLUMN19 + " TEXT, " +
								POVI_COLUMN20 + " TEXT, " +
								POVI_COLUMN21 + " INTEGER, " +
								POVI_COLUMN22 + " TEXT, " +
								POVI_COLUMN23 + " TEXT, " +
								POVI_COLUMN24 + " TEXT, " +
								POVI_COLUMN25 + " TEXT "+");");
						
						//19.产后42天健康体检表
						db.execSQL("CREATE TABLE " + TB_LAST_POSTNATAL_CHECK + " (" + _ID+ " INTEGER PRIMARY KEY AUTOINCREMENT, "+ 
								LAPC_COLUMN1 + " INTEGER, " +
								LAPC_COLUMN2 + " TEXT, " +
								LAPC_COLUMN3 + " REAL, " +
								LAPC_COLUMN4 + " TEXT, " +
								LAPC_COLUMN5 + " TEXT, " +
								LAPC_COLUMN6 + " INTEGER, " +
								LAPC_COLUMN7 + " INTEGER, " +
								LAPC_COLUMN8 + " INTEGER, " +
								LAPC_COLUMN9 + " TEXT, " +
								LAPC_COLUMN10 + " INTEGER, " +
								LAPC_COLUMN11 + " TEXT, " +
								LAPC_COLUMN12 + " INTEGER, " +
								LAPC_COLUMN13 + " TEXT, " +
								LAPC_COLUMN14 + " INTEGER, " +
								LAPC_COLUMN15 + " TEXT, " +
								LAPC_COLUMN16 + " TEXT, " +
								LAPC_COLUMN17 + " INTEGER, " +
								LAPC_COLUMN18 + " TEXT, " +
								LAPC_COLUMN19 + " TEXT, " +
								LAPC_COLUMN20 + " TEXT, " +
								LAPC_COLUMN21 + " INTEGER, " +
								LAPC_COLUMN22 + " TEXT, " +
								LAPC_COLUMN23 + " TEXT, " +
								LAPC_COLUMN24 + " TEXT "+");");
						
						
						
						//13.1岁以内儿童访视表
						db.execSQL("CREATE TABLE " + TB_ONE_CHILD_INFO + " (" + _ID+ " INTEGER PRIMARY KEY AUTOINCREMENT, "+ 
								ONCH_PROFILEID + " INTEGER, " +
								ONCH_STATE + " INTEGER, " +
								ONCH_DATE + " 	TEXT," +
								ONCH_WEIG_VALUE + " REAL, " +
								ONCH_WEIG_CHOI + " INTEGER, " +
								ONCH_HEIG_VALUE + " REAL, " +
								ONCH_HEIG_CHOI + " INTEGER, " +
								ONCH_HEAD_SIZE + " REAL, " +
								ONCH_COMPLEXION + " INTEGER," +
								ONCH_SKIN + " INTEGER, " +
								ONCH_BREGMA_CHOI + " INTEGER, " +
								ONCH_BREGMA_LEFT + " REAL, " +
								ONCH_BREGMA_RIGHT + " REAL, " +
								ONCH_NECK_MASS + " INTEGER, " +
								ONCH_EYE_APPEARANCE + " INTEGER," +
								ONCH_EAR_APPEARANCE + " INTEGER, " +
								ONCH_HEARING + " INTEGER, " +
								ONCH_ORAL + " INTEGER, " +
								ONCH_CARD + " INTEGER, " +
								ONCH_ABDOMEN + " INTEGER, " +
								ONCH_UMBILICAL + " INTEGER," +
								ONCH_LEGS + " INTEGER, " +
								ONCH_STOOP_SYMP + " TEXT, " +
								ONCH_STOOP_SIGN + " TEXT, " +
								ONCH_ANUS + " INTEGER, " +
								ONCH_SANGUINE + " REAL, " +
								ONCH_ACTIVITY + " REAL," +
								ONCH_VD + " REAL, " +
								ONCH_DEVE_ASSE + " INTEGER, " +
								ONCH_DEASES + " INTEGER, " +
								ONCH_OTHER + " TEXT, " +
								ONCH_REFE_CHOI + " INTEGER, " +
								ONCH_REFE_REASION  + " TEXT," +
								ONCH_REFE_INST  + " TEXT," +
								ONCH_GUIDE + " TEXT, " +
								ONCH_NEXT_DATE + " TEXT, " +
								ONCH_DOCTOR + " TEXT "+");");
						
						//14.2岁以内儿童访视表
						db.execSQL("CREATE TABLE " + TB_TWO_CHILD_INFO + " (" + _ID+ " INTEGER PRIMARY KEY AUTOINCREMENT, "+ 
								TWCH_PROFILEID + " INTEGER, " +
								TWCH_STATE + " INTEGER, " +
								TWCH_DATE + " 	TEXT," +
								TWCH_WEIG_VALUE + " REAL, " +
								TWCH_WEIG_CHOI + " INTEGER, " +
								TWCH_HEIG_VALUE + " REAL, " +
								TWCH_HEIG_CHOI + " INTEGER, " +
								TWCH_HEAD_SIZE + " REAL, " +
								TWCH_COMPLEXION + " INTEGER," +
								TWCH_SKIN + " INTEGER, " +
								TWCH_BREGMA_CHOI + " INTEGER, " +
								TWCH_BREGMA_LEFT + " REAL, " +
								TWCH_BREGMA_RIGHT + " REAL, " +
								TWCH_EYE_APPEARANCE + " INTEGER," +
								TWCH_EAR_APPEARANCE + " INTEGER, " +
								TWCH_HEARING + " INTEGER, " +
								TWCH_TEETHING + " INTEGER, " +
								TWCH_CAVITY + " INTEGER, " +
								TWCH_CARD + " INTEGER, " +
								TWCH_ABDOMEN + " INTEGER, " +
								TWCH_LEGS + " INTEGER, " +
								TWCH_GAIT + " INTEGER, " +
								TWCH_STOOP_SIGN + " INTEGER, " +
								TWCH_SANGUINE + " REAL, " +
								TWCH_ACTIVITY + " REAL," +
								TWCH_VD + " REAL, " +
								TWCH_DEVE_ASSE + " INTEGER, " +
								TWCH_DEASES + " INTEGER, " +
								TWCH_OTHER + " TEXT, " +
								TWCH_REFE_CHOI + " INTEGER, " +
								TWCH_REFE_REASION  + " TEXT," +
								TWCH_REFE_INST  + " TEXT," +
								TWCH_GUIDE + " TEXT, " +
								TWCH_GUIDE_DES + " TEXT, " +
								TWCH_NEXT_DATE + " TEXT, " +
								TWCH_DOCTOR + " TEXT "+");");
						
						//15.3~6岁以内儿童访视表
						db.execSQL("CREATE TABLE " + TB_THREE_CHILD_INFO + " (" + _ID+ " INTEGER PRIMARY KEY AUTOINCREMENT, "+ 
								TTCH_PROFILEID + " INTEGER, " +
								TTCH_STATE + " INTEGER, " +
								TTCH_DATE + " 	TEXT," +
								TTCH_WEIG_VALUE + " REAL, " +
								TTCH_WEIG_CHOI + " INTEGER, " +
								TTCH_HEIG_VALUE + " REAL, " +
								TTCH_HEIG_CHOI + " INTEGER, " +
								TTCH_SODE_APPR + " INTEGER, " +
								TTCH_EYE + " REAL," +
								TTCH_HEARING + " INTEGER, " +
								TTCH_TEETHING + " INTEGER, " +
								TTCH_CAVITY + " INTEGER, " +
								TTCH_CARD + " INTEGER, " +
								TTCH_ABDOMEN + " INTEGER, " +
								TTCH_SANGUINE + " REAL, " +
								TTCH_OTHER + " TEXT, " +
								TTCH_DISEASE + " TEXT, " +
								TTCH_NEUMONIA + " INTEGER, " +
								TTCH_DIARRHEA + " INTEGER, " +
								TTCH_INJURY + " INTEGER, " +
								TTCH_NEUMONIA_NUM + " INTEGER, " +
								TTCH_DIARRHEA_NUM + " INTEGER, " +
								TTCH_INJURY_NUM + " INTEGER, " +
								TTCH_OTHER_DISEASE + " TEXT, " +
								TTCH_REFE_CHOI + " INTEGER, " +
								TTCH_REFE_REASION  + " TEXT," +
								TTCH_REFE_INST  + " TEXT," +
								TTCH_GUIDE + " TEXT, " +
								TTCH_GUIDE_DES + " TEXT, " +
								TTCH_NEXT_DATE + " TEXT, " +
								TTCH_DOCTOR + " TEXT "+");");
					

						
						
						
						
						//20.传染病疫情上报表
						db.execSQL("CREATE TABLE " + TB_INFECTIOUS_DISEASE + " (" + _ID+ " INTEGER PRIMARY KEY AUTOINCREMENT, "+ 
								INDI_ID + " INTEGER,"+
								INDI_CATEGORY +" INTEGER," +
								INDI_NAME +" TEXT," +
								INDI_PARENT_NAME+" TEXT," +
								INDI_PERID +" TEXT, " +
								INDI_SEX +" INTEGER," +
								INDI_BORN +" TEXT," +
								INDI_FULL_BORN +" TEXT," +
								INDI_FULL_UNIT +" INTEGER," +
								INDI_WORK +" TEXT," +
								INDI_PHONE +" TEXT," +
								INDI_AREA + " INTEGER," +
								INDI_PROVINCE +" TEXT," +
								INDI_CITY +" TEXT," +
								INDI_COUNTRY +" TEXT," +
								INDI_TOWN +" TEXT," +
								INDI_VILLAGE +" TEXT," +					
								INDI_NUMBER + " TEXT," +
								INDI_JOB + " INTEGER," +
								INDI_JOB_OTHER+" TEXT,"+
								INDI_CLASSIFICATION_A +" INTEGER,"+
								INDI_CLASSIFICATION_B + " INTEGER,"+
								INDI_ILL_DATE + " TEXT," +
								INDI_DIAGNOSE_DATE + " TEXT,"+
								INDI_DIAGNOSE_TIME + " TEXT,"+
								INDI_DIE_DATE + " TEXT," +
								INDI_DISEASE_A + " INTEGER," +
								INDI_OTHER + " TEXT," +
								INDI_DISEASE_NAME + " TEXT,"+
								INDI_REASON + " TEXT," +
								INDI_ORGNIZATION + " TEXT," +
								INDI_CONNECT_PHONE + " TEXT," +
								INDI_REPORT + " TEXT," +
								INDI_FILL_DATE + " TEXT,"+
								INDI_EN + " INTEGER,"+
								INDI_CHECK + " INTEGER,"+
								INDI_REMARK + " TEXT " + ");");

						//21.预防接种卡
						db.execSQL("CREATE TABLE " + TB_VACCINATION_CARD + " (" + _ID +" INTEGER PRIMARY KEY AUTOINCREMENT , "+
								 VACA_PROFILE_ID + " INTEGER ,"+
								 VACA_NAME + " TEXT ,"+
							     VACA_SEX + " TEXT ,"+
							     VACA_BORN + " TEXT ,"+
							     VACA_NATION + " TEXT ,"+
							     VACA_NUMBER_NAME + " TEXT ,"+
							     VACA_CHILD_ID + " TEXT ,"+
							     VACA_CHILD_BORN_ID + " TEXT ,"+
							     VACA_GUARDIAN_NAME + " TEXT ,"+
							     VACA_RELATION + " TEXT ,"+
							     VACA_GUARDIAN_PHONE + " TEXT ,"+
							     VACA_HOME_ADDRESS + " TEXT ,"+
							     VACA_CENSUS_ADDRESS + " INTEGER ,"+
							     VACA_CENSUS_ADDRESS2 + " TEXT ,"+
							     VACA_IMMIGRATION_TIME + " TEXT ,"+
							     VACA_EMIGRATION_TIME + " TEXT ,"+
							     VACA_EMIGRATION_REASON + " TEXT ,"+
							     VACA_VACCINE_ANOMALIES_HIS + " TEXT ,"+
							     VACA_CONTRAINDICATION + " TEXT ,"+
							     VACA_INFECT_HIS + " TEXT ,"+
							     VACA_CREATE_CARD_DATE + " TEXT ,"+
							     VACA_CREATE_CARD_PEOPLE + " TEXT " + " );");

						db.execSQL("CREATE VIEW " + VIEW_VACCINATION_NAME_CODE + 
								" AS SELECT "+ HETI_PROFILEID +","+ HETI_NAME +
								" FROM "+ TB_HERE_TIPA_INFO +","+ TB_VACCINATION_CARD +
								" WHERE "+ HETI_PROFILEID + "=" + VACA_PROFILE_ID + ";"
						);
						
						
						
						//22.预防接种卡记录表
						db.execSQL("CREATE TABLE "+ TB_VACCINATION_RECORD + " ( "+ _ID  +" INTEGER PRIMARY KEY AUTOINCREMENT , "+
							     VARE_PROFILE_ID + " INTEGER ,"+
							     VARE_HEPATITIS_B_VACCINE1 + " TEXT ,"+
							     VARE_HEPATITIS_B_VACCINE2 + " TEXT ,"+
							     VARE_HEPATITIS_B_VACCINE3 + " TEXT ,"+
							     VARE_BCG_VACCINE + " TEXT ,"+
							     VARE_POLIOMYELITIS_VACCINE1 + " TEXT ,"+
							     VARE_POLIOMYELITIS_VACCINE2 + " TEXT ,"+
							     VARE_POLIOMYELITIS_VACCINE3 + " TEXT ,"+
							     VARE_POLIOMYELITIS_VACCINE4 + " TEXT ,"+
							     VARE_DPT1 + " TEXT ,"+
							     VARE_DPT2 + " TEXT ,"+
							     VARE_DPT3 + " TEXT ,"+
							     VARE_DPT4 + " TEXT ,"+
							     VARE_WHITE_BROKEN_VACCINE + " TEXT ,"+
							     VARE_LEPROSY_VACCINE + " TEXT ,"+
							     VARE_MMR_VACCINE1 + " TEXT ,"+
							     VARE_MMR_VACCINE2 + " TEXT ,"+
							     VARE_MMR_VACCINE + " TEXT ,"+
							     VARE_MEASLES_VACCINE1 + " TEXT ,"+
							     VARE_MEASLES_VACCINE2 + " TEXT ,"+
							     VARE_AMENV1 + " TEXT ,"+
							     VARE_AMENV2 + " TEXT ,"+
							     VARE_A_CMENV1 + " TEXT ,"+
							     VARE_A_CMENV2 + " TEXT ,"+
							     VARE_YINAO_LIVE_VACCINE1 + " TEXT ,"+
							     VARE_YINAO_LIVE_VACCINE2 + " TEXT ,"+
							     VARE_YINAO_INACTIVATED_VACCINE1 + " TEXT ,"+
							     VARE_YINAO_INACTIVATED_VACCINE2 + " TEXT ,"+
							     VARE_YINAO_INACTIVATED_VACCINE3 + " TEXT ,"+
							     VARE_YINAO_INACTIVATED_VACCINE4 + " TEXT ,"+
							     VARE_ARMOUR_LIVER_VACCINE_DECREASE_TOXICITY + " TEXT ,"+
							     VARE_VAQTA1 + " TEXT ,"+
							     VARE_VAQTA2 + " TEXT ,"+
							     VARE_OTHER_VACCINE1 + " TEXT ,"+
							     VARE_OTHER_VACCINE2 + " TEXT ,"+
							     VARE_OTHER_VACCINE3 + " TEXT ,"+
							     VARE_OTHER_VACCINE4 + " TEXT ,"+
							     VARE_OTHER_VACCINE5 + " TEXT ," +
							     VARE_OTHER_VACCINE6 + " TEXT " + " );" );
						
						//23.重性精神疾病患者个人信息补充表
						db.execSQL("CREATE TABLE " + TB_MENTALER_INFO + " (" + _ID+ " INTEGER PRIMARY KEY AUTOINCREMENT, "+ 
								MEIN_PROFILEID + " INTEGER , " +
							    MEIN_GUARDIAN_NAME + " TEXT , " +
							    MEIN_GUARDIAN_RELATION + " TEXT , " +
							    MEIN_GUARDIAN_ADDRESS + " TEXT , " +
							    MEIN_GUARDIAN_PHONE + " TEXT , " +
							    MEIN_NEIGHBOR_NAME + " TEXT , " +
							    MEIN_NEIGHBOR_PHONE + " TEXT , " +
							    MEIN_APPROVED + " INTEGER , " +
							    MEIN_SELF_SIGNATURE + " TEXT , " +
							    MEIN_SELF_SIGNATURE_TIME + " TEXT , " +
							    MEIN_FIRST_OCCUR_TIME + " TEXT , " +
							    MEIN_PAST_SYMPTOMS + " TEXT , " +
							    MEIN_PAST_SYMPTOMS_OTHER + " TEXT , " +
							    MEIN_CLINIC + " INTEGER , " +
							    MEIN_FIRST_TREAT_TIME + " TEXT , " +
							    MEIN_HOSPITAL_TIMES + " INTEGER , " +
							    MEIN_CURRENT_STATE + " TEXT , " +
							    MEIN_DIAGNOSE_HOSPITAL + " TEXT , " +
							    MEIN_DIAGNOSE_TIME + " TEXT , " +
							    MEIN_RECENT_TREATMENT + " INTEGER , " +
							    MEIN_INFLUENCE + " TEXT , " +
							    MEIN_INFLU_TROUBLE + " INTEGER , " +
							    MEIN_INFLU_ACCIDENT + " INTEGER , " +
							    MEIN_INFLU_DISASTER + " INTEGER , " +
							    MEIN_INFLU_INJURE + " INTEGER , " +
							    MEIN_INFLU_SUICIDE + " INTEGER , " +
							    MEIN_LOCK + " INTEGER , " +
							    MEIN_ECONOMY + " INTEGER , " +
							    MEIN_ADVICES + " TEXT , " +
							    MEIN_DATE + " TEXT , " +
							    MEIN_DOCTOR + " TEXT "+");");
						
						db.execSQL("CREATE VIEW " + VIEW_MENTAL_NAME_CODE + 
								" AS SELECT "+ HETI_PROFILEID+","+HETI_NAME+
								" FROM "+TB_HERE_TIPA_INFO+","+TB_MENTALER_INFO+
								" WHERE "+HETI_PROFILEID+"="+MEIN_PROFILEID+";"
						);
						
						//24.重性精神疾病患者随访服务记录表
						db.execSQL("CREATE TABLE " + TB_VISIT_MENTALS + " (" + _ID+ " INTEGER PRIMARY KEY AUTOINCREMENT, "+ 
								VIME_PROFILEID + " INTEGER , " +
							    VIME_TIMES + " INTEGER , " +
							    VIME_DATE + " TEXT , " +
							    VIME_DANGER_STATE + " INTEGER , " +
							    VIME_SYMPTOMS + " TEXT , " +
							    VIME_SYMPTOM_OTHER + " TEXT , " +
							    VIME_INSIGHT + " INTEGER , " +
							    VIME_SLEEP+ " INTEGER , " +
							    VIME_DIET + " INTEGER , " +
							    VIME_SOCIAL_PERSONAL_LIFE + " INTEGER , " +
							    VIME_SOCIAL_FAMILY + " INTEGER , " +
							    VIME_SOCIAL_WORK + " INTEGER , " +
							    VIME_SOCIAL_STUDY + " INTEGER , " +
							    VIME_SOCIAL_COM + " INTEGER , " +
							    VIME_INFLUENCE + " TEXT , " +
							    VIME_INFLU_TROUBLE + " INTEGER , " +
							    VIME_INFLU_ACCIDENT + " INTEGER , " +
							    VIME_INFLU_DISASTER + " INTEGER , " +
							    VIME_INFLU_INJURE + " INTEGER , " +
							    VIME_INFLU_SUICIDE + " INTEGER , " +
							    VIME_LOCK + " INTEGER , " +
							    VIME_HOSPITAL + " INTEGER , " +
							    VIME_LAST_LEAVE_HOS_DATE + " TEXT , " +
							    VIME_HAS_LAB_CHECK + " INTEGER , " +
							    VIME_LAB_CHECK + " TEXT , " +
							    VIME_MEDI_COMPLY + " INTEGER , " +
							    VIME_HAS_DRUG_REACTION + " INTEGER , " +
							    VIME_DRUG_REACTION + " TEXT , " +
							    VIME_TREATMENT + " INTEGER , " +
							    VIME_NEED_TRANSFER + " INTEGER , " +
							    VIME_TRANSFER_REASON + " TEXT , " +
							    VIME_TRANSFER_HOSPITAL + " TEXT , " +
							    VIME_MEDICINE_1 + " TEXT , " +
							    VIME_MEDI_1_USAGE + " INTEGER , " +
							    VIME_MEDI_1_DOSAGE + " FLOAT , " +
							    VIME_MEDICINE_2 + " TEXT , " +
							    VIME_MEDI_2_USAGE + " INTEGER , " +
							    VIME_MEDI_2_DOSAGE + " FLOAT , " +
							    VIME_MEDICINE_3 + " TEXT , " +
							    VIME_MEDI_3_USAGE + " INTEGER , " +
							    VIME_MEDI_3_DOSAGE + " FLOAT , " +
							    VIME_RECOVER + " TEXT , " +
							    VIME_RECOVER_OTHER + " TEXT , " +
							    VIME_CLASSIFY + " INTEGER , " +
							    VIME_NEXT_VISIT_TIME + " TEXT , " +
							    VIME_DOCTOR + " TEXT "+");");
						//25.健康教育活动记录表
						db.execSQL("CREATE TABLE "+ TB_HEALTHEDU_RECORD+"(" + _ID+ " INTEGER PRIMARY KEY AUTOINCREMENT,"
								+HERE_TIME+" TEXT,"+
								HERE_PLACE+" TEXT,"+
								HERE_FORM+" TEXT,"+
								HERE_THEME+" TEXT,"+
								HERE_ORGANIZER+" TEXT,"+
								HERE_SORT+" TEXT,"+
								HERE_ACC_NUM+" INTERGER,"+
								HERE_KIND_NUM+" TEXT,"+
								HERE_CONTENT+" TEXT,"+
								HERE_EVALUATE+" TEXT,"+
								HERE_PERSON_SIGN+" TEXT,"+
								HERE_CHARGE_SIGN+" TEXT,"+
								HERE_FILLTIME+" TEXT,"+
								HERE_MATERIAL+" TEXT "+");");
						
						//26.糖尿病随访服务记录表
						db.execSQL("CREATE TABLE " + TB_DIABET_SERVICE + " (" + _ID+ " INTEGER PRIMARY KEY AUTOINCREMENT, "+ 
								DISE_PROFILEID + " INTEGER , " +
								DISE_TIMES + " INTEGER ," +
							    DISE_DATE + " TEXT ," +
							    DISE_SERVICE_PATTERN + " INTEGER ," +
							    DISE_SYMPTOMS + " TEXT , " +
							    DISE_SYMPTOM_OTHER + " TEXT , " +
							    DISE_BLOOD_PRESSURE_HIGH + " INTEGER ," +
							    DISE_BLOOD_PRESSURE_LOW + " INTEGER ," +
							    DISE_WEIGHT_NOW + " FLOAT, " +
							    DISE_WEIGHT_GOAL + " FLOAT, " +
							    DISE_BMT_NOW + " FLOAT, " +
							    DISE_BMT_GOAL + " FLOAT, " +
							    DISE_DAP + " INTEGER ," +
							    DISE_PHYSICAL_SIGN_OTHER + " TEXT, " +
							    DISE_SMOKE_NOW + " INTEGER ," +
							    DISE_SMOKE_GOAL + " INTEGER ," +
							    DISE_DRINK_NOW + " FLOAT, " +
							    DISE_DRINK_GOAL + " FLOAT, " +
							    DISE_EXE_PER_WEEK_NOW + " INTEGER ," +
							    DISE_EXE_LASTLONG_NOW + " INTEGER ," +
							    DISE_EXE_PER_WEEK_GOAL + " INTEGER ," +
							    DISE_EXE_LAST_LONG_GOAL + " INTEGER ," +
							    DISE_DIET_NOW + " FLOAT, " +
							    DISE_DIET_GOAL + " FLOAT, " +
							    DISE_MENTALITY + " INTEGER ," +
							    DISE_COMPLY + " INTEGER ," +
							    DISE_FBS + " FLOAT, " +
							    DISE_HEMOGLOBIN + " FLOAT, " +
							    DISE_ACCE_EXAM_TIME + " TEXT, " +
							    DISE_ACCE_EXAM_OTHER + " TEXT," +
							    DISE_OBEDIENCE + " INTEGER ," +
							    DISE_UNTOWARD_EFFECT + " INTEGER ," +
							    DISE_HYPOGLYCEMIA + " INTEGER ," +
							    DISE_CLASSIFY + " INTEGER ," +
							    DISE_MEDICINE_1 + " TEXT, " +
							    DISE_MEDI_1_USAGE + " INTEGER ," +
							    DISE_MEDI_1_DOSAGE + " FLOAT, " +
							    DISE_MEDICINE_2 + " TEXT, " +
							    DISE_MEDI_2_USAGE + " INTEGER ," +
							    DISE_MEDI_2_DOSAGE + " FLOAT, " +
							    DISE_MEDICINE_3 + " TEXT, " +
							    DISE_MEDI_3_USAGE + " INTEGER ," +
							    DISE_MEDI_3_DOSAGE + " FLOAT, " +
							    DISE_GLUCOKININ + " TEXT, " +
							    DISE_GLUCOKININ_USE + " TEXT, " +
							    DISE_TRANSFER_REANSON + " TEXT, " +
							    DISE_TRANSFER_HOSPITAL + " TEXT, " +
							    DISE_NEXT_VISIT_TIME + " TEXT, " +
							    DISE_DOCTOR + " TEXT "+");");
						
						db.execSQL("CREATE VIEW " + VIEW_DIABET_NAME_CODE + 
								" AS SELECT "+ HETI_PROFILEID+","+HETI_NAME+
								" FROM "+TB_HERE_TIPA_INFO+","+TB_DIABET_SERVICE+
								" WHERE "+HETI_PROFILEID+"="+DISE_PROFILEID+";"
						);
						
						
						/********************************************************/
						/*转移数据*/
						Cursor cursor = getContentResolver().query(
								Constants.CONTENT_URI_TB1,null, null, null, null);
						int i = 1;
						while(cursor.moveToNext()){
							Log.i(TAG,"query table1 index="+i);
							ContentValues value = new ContentValues();
							value.put(HETI_PROFILEID,cursor.getInt(cursor.getColumnIndex(HETI_PROFILEID)));
							value.put(HETI_HERE_ID,cursor.getString(cursor.getColumnIndex(HETI_HERE_ID)));
							value.put(HETI_NAME,cursor.getString(cursor.getColumnIndex(HETI_NAME)));
							value.put(HETI_NOW_ADDR,cursor.getString(cursor.getColumnIndex(HETI_NOW_ADDR)));
							value.put(HETI_HORE_ADDR,cursor.getString(cursor.getColumnIndex(HETI_HORE_ADDR)));
							value.put(HETI_TEL,cursor.getString(cursor.getColumnIndex(HETI_TEL)));
							value.put(HETI_TOWN_NAME,cursor.getString(cursor.getColumnIndex(HETI_TOWN_NAME)));
							value.put(HETI_VICO_NAME,cursor.getString(cursor.getColumnIndex(HETI_VICO_NAME)));
							value.put(HETI_BUIL_UNIT,cursor.getString(cursor.getColumnIndex(HETI_BUIL_UNIT)));
							value.put(HETI_BUIL_PER,cursor.getString(cursor.getColumnIndex(HETI_BUIL_PER)));
							value.put(HETI_DOCTOR,cursor.getString(cursor.getColumnIndex(HETI_DOCTOR)));
							value.put(HETI_BUIL_DATE,cursor.getString(cursor.getColumnIndex(HETI_BUIL_DATE)));
							db.insert(TB_HERE_TIPA_INFO, null, value);
							i++;
						}
						
						cursor = getContentResolver().query(
								Constants.CONTENT_URI_TB2,null, null, null, null);
						i = 1;
						while(cursor.moveToNext()){
							Log.i(TAG,"query table2 index="+i);
							ContentValues value = new ContentValues();
							value.put(MOSE_PROFILE_ID , cursor.getInt(cursor.getColumnIndex(Constants.MOSE_PROFILE_ID)));
							value.put(MOSE_HEALTH_RECORD_ID , cursor.getInt(cursor.getColumnIndex(Constants.MOSE_HEALTH_RECORD_ID)));
							value.put(MOSE_VACCINATE_ID,cursor.getInt(cursor.getColumnIndex(Constants.MOSE_VACCINATE_ID)));
							value.put(MOSE_0_6_CHILD_HEALTH_ID,cursor.getInt(cursor.getColumnIndex(Constants.MOSE_0_6_CHILD_HEALTH_ID)));
							value.put(MOSE_MATERNAL_HEALTH_ID,cursor.getInt(cursor.getColumnIndex(Constants.MOSE_MATERNAL_HEALTH_ID)));
							value.put(MOSE_MENTAL_ID , cursor.getInt(cursor.getColumnIndex(Constants.MOSE_MENTAL_ID)));
							value.put(MOSE_DIABET2_ID , cursor.getInt(cursor.getColumnIndex(MOSE_DIABET2_ID)));
							value.put(MOSE_HYPERTENSION_ID , cursor.getInt(cursor.getColumnIndex(MOSE_HYPERTENSION_ID)));
							value.put(MOSE_OLDS_ID , cursor.getInt(cursor.getColumnIndex(MOSE_OLDS_ID)));
							db.insert(TB_MODULE_SELECT, null, value);
						    i++;
						}
						
						cursor = getContentResolver().query(
								Constants.CONTENT_URI_TB3,null, null, null, null);
						i = 1;
						while(cursor.moveToNext()){
							Log.i(TAG,"query table3 index="+i);
							ContentValues value = new ContentValues();
							value.put(PEIN_PROFILE_ID,cursor.getInt(cursor.getColumnIndex(PEIN_PROFILE_ID)));	
							value.put(PEIN_SEX,cursor.getInt(cursor.getColumnIndex(PEIN_SEX)));
							value.put(PEIN_BORN,cursor.getString(cursor.getColumnIndex(PEIN_BORN)));
							value.put(PEIN_PERID,cursor.getString(cursor.getColumnIndex(PEIN_PERID)));
							value.put(PEIN_WORK,cursor.getString(cursor.getColumnIndex(PEIN_WORK)));
							value.put(PEIN_PHONE,cursor.getString(cursor.getColumnIndex(PEIN_PHONE)));
							value.put(PEIN_CONTACT_NAME,cursor.getString(cursor.getColumnIndex(PEIN_CONTACT_NAME)));
							value.put(PEIN_CONTACT_PHONE,cursor.getString(cursor.getColumnIndex(PEIN_CONTACT_PHONE)));
							value.put(PEIN_PERMATENT_TYPE,cursor.getInt(cursor.getColumnIndex(PEIN_PERMATENT_TYPE)));
							value.put(PEIN_NATION,cursor.getInt(cursor.getColumnIndex(PEIN_NATION)));
							value.put(PEIN_MINORITY,cursor.getString(cursor.getColumnIndex(PEIN_MINORITY)));
							value.put(PEIN_BLOOD_TYPE,cursor.getInt(cursor.getColumnIndex(PEIN_BLOOD_TYPE)));
							value.put(PEIN_RH_NEGATIVE,cursor.getInt(cursor.getColumnIndex(PEIN_RH_NEGATIVE)));
							value.put(PEIN_CULTURE_STDD,cursor.getInt(cursor.getColumnIndex(PEIN_CULTURE_STDD)));
							value.put(PEIN_OCCUPATION,cursor.getInt(cursor.getColumnIndex(PEIN_OCCUPATION)));
							value.put(PEIN_MARRIAGE,cursor.getInt(cursor.getColumnIndex(PEIN_MARRIAGE)));
							value.put(PEIN_HOS_COST_TYPE ,cursor.getString(cursor.getColumnIndex(PEIN_HOS_COST_TYPE)));
							value.put(PEIN_HOS_COST_TYPE_OT,cursor.getString(cursor.getColumnIndex(PEIN_HOS_COST_TYPE_OT)));
							value.put(PEIN_DRUG_ALLERGY,cursor.getString(cursor.getColumnIndex(PEIN_DRUG_ALLERGY)));
							value.put(PEIN_DRUG_ALLERGY_OT,cursor.getString(cursor.getColumnIndex(PEIN_DRUG_ALLERGY_OT)));
							value.put(PEIN_EXPOSURE_HIS,cursor.getString(cursor.getColumnIndex(PEIN_EXPOSURE_HIS)));
							value.put(PEIN_DISEASE,cursor.getString(cursor.getColumnIndex(PEIN_DISEASE)));
							value.put(PEIN_CANCER,cursor.getString(cursor.getColumnIndex(PEIN_CANCER)));
							value.put(PEIN_OCC_DIS,cursor.getString(cursor.getColumnIndex(PEIN_OCC_DIS)));
							value.put(PEIN_DISEASE_OT,cursor.getString(cursor.getColumnIndex(PEIN_DISEASE_OT)));
							value.put(PEIN_DISEASE_DATE,cursor.getString(cursor.getColumnIndex(PEIN_DISEASE_DATE)));
							value.put(PEIN_SURGERY,cursor.getInt(cursor.getColumnIndex(PEIN_SURGERY)));
							value.put(PEIN_SURGERY_NAME1,cursor.getString(cursor.getColumnIndex(PEIN_SURGERY_NAME1)));
							value.put(PEIN_SURGERY_DATE1,cursor.getString(cursor.getColumnIndex(PEIN_SURGERY_DATE1)));
							value.put(PEIN_SURGERY_NAME2,cursor.getString(cursor.getColumnIndex(PEIN_SURGERY_NAME2)));
							value.put(PEIN_SURGERY_DATE2,cursor.getString(cursor.getColumnIndex(PEIN_SURGERY_DATE2)));
							value.put(PEIN_TRAUMA,cursor.getInt(cursor.getColumnIndex(PEIN_TRAUMA)));
							value.put(PEIN_TRAUMA_NAME1,cursor.getString(cursor.getColumnIndex(PEIN_TRAUMA_NAME1)));
							value.put(PEIN_TRAUMA_TIME1,cursor.getString(cursor.getColumnIndex(PEIN_TRAUMA_TIME1)));
							value.put(PEIN_TRAUMA_NAME2,cursor.getString(cursor.getColumnIndex(PEIN_TRAUMA_NAME2)));
							value.put(PEIN_TRAUMA_TIME2,cursor.getString(cursor.getColumnIndex(PEIN_TRAUMA_TIME2)));
							value.put(PEIN_TRANSFUSION,cursor.getInt(cursor.getColumnIndex(PEIN_TRANSFUSION)));
							value.put(PEIN_TRFUSION_REASON1,cursor.getString(cursor.getColumnIndex(PEIN_TRFUSION_REASON1)));
							value.put(PEIN_TRFUSION_TIME1,cursor.getString(cursor.getColumnIndex(PEIN_TRFUSION_TIME1)));
							value.put(PEIN_TRFUSION_REASON2,cursor.getString(cursor.getColumnIndex(PEIN_TRFUSION_REASON2)));
							value.put(PEIN_TRFUSION_TIME2,cursor.getString(cursor.getColumnIndex(PEIN_TRFUSION_TIME2)));
							value.put(PEIN_FAMILY_HIS_FT,cursor.getString(cursor.getColumnIndex(PEIN_FAMILY_HIS_FT)));
							value.put(PEIN_FAMILY_HIS_FT_OT,cursor.getString(cursor.getColumnIndex(PEIN_FAMILY_HIS_FT_OT)));
							value.put(PEIN_FAMILY_HIS_MT,cursor.getString(cursor.getColumnIndex(PEIN_FAMILY_HIS_MT)));
							value.put(PEIN_FAMILY_HIS_MT_OT,cursor.getString(cursor.getColumnIndex(PEIN_FAMILY_HIS_MT_OT)));
							value.put(PEIN_FAMILY_HIS_BS,cursor.getString(cursor.getColumnIndex(PEIN_FAMILY_HIS_BS)));
							value.put(PEIN_FAMILY_HIS_BS_OT,cursor.getString(cursor.getColumnIndex(PEIN_FAMILY_HIS_BS_OT)));
							value.put(PEIN_FAMILY_HIS_SD,cursor.getString(cursor.getColumnIndex(PEIN_FAMILY_HIS_SD)));
							value.put(PEIN_FAMILY_HIS_SD_OT,cursor.getString(cursor.getColumnIndex(PEIN_FAMILY_HIS_SD_OT)));
							value.put(PEIN_HEREDITARY_HIS,cursor.getInt(cursor.getColumnIndex(PEIN_HEREDITARY_HIS)));
							value.put(PEIN_HEREDITARY_NAME,cursor.getString(cursor.getColumnIndex(PEIN_HEREDITARY_NAME)));
							value.put(PEIN_DISABLE_SITU,cursor.getString(cursor.getColumnIndex(PEIN_DISABLE_SITU)));
							value.put(PEIN_DISABLE_SITU_OT,cursor.getString(cursor.getColumnIndex(PEIN_DISABLE_SITU_OT)));
							value.put(PEIN_LIVE_KIT,cursor.getInt(cursor.getColumnIndex(PEIN_LIVE_KIT)));
							value.put(PEIN_LIVE_FUEL,cursor.getInt(cursor.getColumnIndex(PEIN_LIVE_FUEL)));
							value.put(PEIN_LIVE_WATER,cursor.getInt(cursor.getColumnIndex(PEIN_LIVE_WATER)));
							value.put(PEIN_LIVE_TOILET,cursor.getInt(cursor.getColumnIndex(PEIN_LIVE_TOILET)));
							value.put(PEIN_LIVE_STOCK,cursor.getInt(cursor.getColumnIndex(PEIN_LIVE_STOCK)));
							db.insert(TB_PERSON_INFO, null, value);
						
						    i++;
						}
						
						cursor.close();
						db.close();
					}
					catch(Exception e){
						e.printStackTrace();
					}
					
					handler.sendMessage(message);
				}
				
			}.start();
		}
		
	}
}